package com.dh.demo;

public class Dog {

    public static void main(String[] args) {
        for (int i = 0; i < 100000; i++) {
            Dog dog = new Dog();
//            System.gc();// 启动垃圾，尽量不要这个

        }


    }


    @Override
    protected void finalize() throws Throwable {
        System.out.println("对象被销毁。。。");
    }
}
